<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
        <head><title>trait TestNGSuite in org.scalatest.testng</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF8"></meta><meta content="scaladoc (version 2.7.2.final)" name="generator"></meta><link href="../../../style.css" type="text/css" rel="stylesheet"></link><script type="text/javascript" src="../../../script.js"></script>
        </head>
        <body onload="init()">
        <table summary="" class="navigation">
        <tr>
          <td class="navigation-links" valign="top">
            <!-- <table><tr></tr></table> -->
          </td>
          <td align="right" valign="top" style="white-space:nowrap;" rowspan="2">
            <div class="doctitle-larger">ScalaTest 0.9.4</div>
          </td>
        </tr>
        <tr><td></td></tr>
      </table>
        
      <div class="entity">
        <a href="../../../org/scalatest/testng$package.html" target="_self">org.scalatest.testng</a>
        <br></br>
        <span class="entity">trait  TestNGSuite</span>
      </div><hr></hr>
      <div class="source">
        [source: <a href="" class="org/scalatest/testng/TestNGSuite"><code>org/scalatest/testng/TestNGSuite.scala</code></a>]
      </div><hr></hr>
      <a name="TestNGSuite"></a><dl>
      <dt>
        
        <code></code>
        <code>trait</code>
        <em>TestNGSuite</em>
      </dt>
      <dd><code> extends </code><a href="../../../org/scalatest/Suite.html" target="_self">Suite</a></dd>
    </dl>
      <dl><dd>A suite of tests that can be run with either TestNG or ScalaTest. This trait allows you to mark any
 method as a test using TestNG's <code>@Test</code> annotation, and supports all other TestNG annotations.
 Here's an example:
 </p>

 <pre>
 import org.scalatest.testng.TestNGSuite
 import org.testng.annotations.Test
 import org.testng.annotations.Configuration
 import scala.collection.mutable.ListBuffer
 
 class MySuite extends TestNGSuite {
 
   var sb: StringBuilder = _
   var lb: ListBuffer[String] = _
 
   @Configuration { val beforeTestMethod = true }
   def setUpFixture() {
     sb = new StringBuilder("ScalaTest is ")
     lb = new ListBuffer[String]
   }
 
   @Test { val invocationCount = 3 }
   def easyTest() {
     sb.append("easy!")
     assert(sb.toString === "ScalaTest is easy!")
     assert(lb.isEmpty)
     lb += "sweet"
   }
 
   @Test { val groups = Array("com.mycompany.groups.SlowTest") }
   def funTest() {
     sb.append("fun!")
     assert(sb.toString === "ScalaTest is fun!")
     assert(lb.isEmpty)
   }
 }
 </pre>

 <p>
 To execute <code>TestNGSuite</code>s with ScalaTest's <code>Runner</code>, you must include TestNG's jar file on the class path or runpath.
 This version of <code>TestNGSuite</code> was tested with TestNG version 5.7.
 </p></dd></dl>
      <dl><dt style="margin:10px 0 0 20px;">
        <b>Author</b></dt><dd>Josh Cough</dd></dl>
    <dl>
      <dt style="margin:10px 0 0 20px;"><b>Direct Known Subclasses:</b></dt>
      <dd><a href="../../../org/scalatest/testng/TestNGWrapperSuite.html" target="_self">TestNGWrapperSuite</a></dd>
      </dl><hr></hr>
      


<table summary="" cellpadding="3" class="member">
      <tr><td class="title" colspan="2">Method Summary</td></tr>
      <tr>
      <td class="modifiers" valign="top"> 
        <code>override def</code>
      </td>
      <td class="signature">
        <em><a href="../../../org/scalatest/testng/TestNGSuite.html#execute%28Option%5BString%5D%2Corg.scalatest.Reporter%2Corg.scalatest.Stopper%2CSet%5BString%5D%2CSet%5BString%5D%2CMap%5BString%2CAny%5D%2COption%5Borg.scalatest.Distributor%5D%29" target="_self">execute</a></em>
        (<em>testName</em> : <a href="" target="contentFrame" class="scala/Option">scala.Option</a>[<a href="" target="contentFrame" class="java/lang/String">java.lang.String</a>], <em>reporter</em> : <a href="../../../org/scalatest/Reporter.html" target="_self">Reporter</a>, <em>stopper</em> : <a href="../../../org/scalatest/Stopper.html" target="_self">Stopper</a>, <em>groupsToInclude</em> : <a href="" target="contentFrame" class="scala/collection/immutable/Set">scala.collection.immutable.Set</a>[<a href="" target="contentFrame" class="java/lang/String">java.lang.String</a>], <em>groupsToExclude</em> : <a href="" target="contentFrame" class="scala/collection/immutable/Set">scala.collection.immutable.Set</a>[<a href="" target="contentFrame" class="java/lang/String">java.lang.String</a>], <em>properties</em> : <a href="" target="contentFrame" class="scala/collection/immutable/Map">scala.collection.immutable.Map</a>[<a href="" target="contentFrame" class="java/lang/String">java.lang.String</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html" target="_self">Any</a>], <em>distributor</em> : <a href="" target="contentFrame" class="scala/Option">scala.Option</a>[<a href="../../../org/scalatest/Distributor.html" target="_self">Distributor</a>]) : <a href="http://www.scala-lang.org/docu/files/api/scala/Unit.html" target="_self">Unit</a>
        
        <div>Execute this <code>TestNGSuite</code>.</div>
      </td>
    </tr>
      </table><table summary="" cellpadding="3" class="inherited">
        <tr><td class="title" colspan="2">
          Methods inherited from <a href="../../../org/scalatest/Suite.html" target="_self">Suite</a>
        </td></tr>
        <tr><td class="signature" colspan="2">
          <a href="../../../org/scalatest/Suite.html#nestedSuites" target="_self">nestedSuites</a>, <a href="../../../org/scalatest/Suite.html#execute%28%29" target="_self">execute</a>, <a href="../../../org/scalatest/Suite.html#execute%28String%29" target="_self">execute</a>, <a href="../../../org/scalatest/Suite.html#groups" target="_self">groups</a>, <a href="../../../org/scalatest/Suite.html#testNames" target="_self">testNames</a>, <a href="../../../org/scalatest/Suite.html#runTest%28String%2Corg.scalatest.Reporter%2Corg.scalatest.Stopper%2CMap%5BString%2CAny%5D%29" target="_self">runTest</a>, <a href="../../../org/scalatest/Suite.html#runTests%28Option%5BString%5D%2Corg.scalatest.Reporter%2Corg.scalatest.Stopper%2CSet%5BString%5D%2CSet%5BString%5D%2CMap%5BString%2CAny%5D%29" target="_self">runTests</a>, <a href="../../../org/scalatest/Suite.html#runNestedSuites%28org.scalatest.Reporter%2Corg.scalatest.Stopper%2CSet%5BString%5D%2CSet%5BString%5D%2CMap%5BString%2CAny%5D%2COption%5Borg.scalatest.Distributor%5D%29" target="_self">runNestedSuites</a>, <a href="../../../org/scalatest/Suite.html#suiteName" target="_self">suiteName</a>, <a href="../../../org/scalatest/Suite.html#expectedTestCount%28Set%5BString%5D%2CSet%5BString%5D%29" target="_self">expectedTestCount</a>
        </td></tr>
      </table><table summary="" cellpadding="3" class="inherited">
        <tr><td class="title" colspan="2">
          Methods inherited from <a href="../../../org/scalatest/Assertions.html" target="_self">Assertions</a>
        </td></tr>
        <tr><td class="signature" colspan="2">
          <a href="../../../org/scalatest/Assertions.html#assert%28Boolean%29" target="_self">assert</a>, <a href="../../../org/scalatest/Assertions.html#assert%28Boolean%2CAny%29" target="_self">assert</a>, <a href="../../../org/scalatest/Assertions.html#assert%28Option%5BString%5D%2CAny%29" target="_self">assert</a>, <a href="../../../org/scalatest/Assertions.html#assert%28Option%5BString%5D%29" target="_self">assert</a>, <a href="../../../org/scalatest/Assertions.html#convertToEqualizer%28Any%29" target="_self">convertToEqualizer</a>, <a href="../../../org/scalatest/Assertions.html#intercept%28java.lang.Class%5BT%5D%2CAny%29" target="_self">intercept</a>, <a href="../../../org/scalatest/Assertions.html#intercept%28java.lang.Class%5BT%5D%29" target="_self">intercept</a>, <a href="../../../org/scalatest/Assertions.html#intercept%28%3D%3EAny%29" target="_self">intercept</a>, <a href="../../../org/scalatest/Assertions.html#expect%28Any%2CAny%29" target="_self">expect</a>, <a href="../../../org/scalatest/Assertions.html#expect%28Any%29" target="_self">expect</a>, <a href="../../../org/scalatest/Assertions.html#fail%28%29" target="_self">fail</a>, <a href="../../../org/scalatest/Assertions.html#fail%28String%29" target="_self">fail</a>, <a href="../../../org/scalatest/Assertions.html#fail%28String%2CThrowable%29" target="_self">fail</a>, <a href="../../../org/scalatest/Assertions.html#fail%28Throwable%29" target="_self">fail</a>
        </td></tr>
      </table><table summary="" cellpadding="3" class="inherited">
        <tr><td class="title" colspan="2">
          Methods inherited from <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html" target="_self">AnyRef</a>
        </td></tr>
        <tr><td class="signature" colspan="2">
          <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#getClass%28%29" target="_self">getClass</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#hashCode%28%29" target="_self">hashCode</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#equals%28Any%29" target="_self">equals</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#clone%28%29" target="_self">clone</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#toString%28%29" target="_self">toString</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#notify%28%29" target="_self">notify</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#notifyAll%28%29" target="_self">notifyAll</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#wait%28Long%29" target="_self">wait</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#wait%28Long%2CInt%29" target="_self">wait</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#wait%28%29" target="_self">wait</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#finalize%28%29" target="_self">finalize</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#%3D%3D%28AnyRef%29" target="_self">==</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#%21%3D%28AnyRef%29" target="_self">!=</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#eq%28AnyRef%29" target="_self">eq</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#ne%28AnyRef%29" target="_self">ne</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/AnyRef.html#synchronized%28T0%29" target="_self">synchronized</a>
        </td></tr>
      </table><table summary="" cellpadding="3" class="inherited">
        <tr><td class="title" colspan="2">
          Methods inherited from <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html" target="_self">Any</a>
        </td></tr>
        <tr><td class="signature" colspan="2">
          <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html#%3D%3D%28Any%29" target="_self">==</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html#%21%3D%28Any%29" target="_self">!=</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html#isInstanceOf" target="_self">isInstanceOf</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html#asInstanceOf" target="_self">asInstanceOf</a>
        </td></tr>
      </table>


      


<table summary="" cellpadding="3" class="member-detail">
          <tr><td class="title">Method Details</td></tr>
        </table><div><a name="execute%28Option%5BString%5D%2Corg.scalatest.Reporter%2Corg.scalatest.Stopper%2CSet%5BString%5D%2CSet%5BString%5D%2CMap%5BString%2CAny%5D%2COption%5Borg.scalatest.Distributor%5D%29"></a><dl>
      <dt>
        
        <code>override</code>
        <code>def</code>
        <em>execute</em>(<em>testName</em> : <a href="" target="contentFrame" class="scala/Option">scala.Option</a>[<a href="" target="contentFrame" class="java/lang/String">java.lang.String</a>], <em>reporter</em> : <a href="../../../org/scalatest/Reporter.html" target="_self">Reporter</a>, <em>stopper</em> : <a href="../../../org/scalatest/Stopper.html" target="_self">Stopper</a>, <em>groupsToInclude</em> : <a href="" target="contentFrame" class="scala/collection/immutable/Set">scala.collection.immutable.Set</a>[<a href="" target="contentFrame" class="java/lang/String">java.lang.String</a>], <em>groupsToExclude</em> : <a href="" target="contentFrame" class="scala/collection/immutable/Set">scala.collection.immutable.Set</a>[<a href="" target="contentFrame" class="java/lang/String">java.lang.String</a>], <em>properties</em> : <a href="" target="contentFrame" class="scala/collection/immutable/Map">scala.collection.immutable.Map</a>[<a href="" target="contentFrame" class="java/lang/String">java.lang.String</a>, <a href="http://www.scala-lang.org/docu/files/api/scala/Any.html" target="_self">Any</a>], <em>distributor</em> : <a href="" target="contentFrame" class="scala/Option">scala.Option</a>[<a href="../../../org/scalatest/Distributor.html" target="_self">Distributor</a>]) : <a href="http://www.scala-lang.org/docu/files/api/scala/Unit.html" target="_self">Unit</a>
      </dt>
      <dd></dd>
    </dl>
      <dl><dd>Execute this <code>TestNGSuite</code>.</dd></dl>
      <dl><dt style="margin:10px 0 0 20px;">
        <b>Parameters</b></dt><dd><code>testName - </code>an optional name of one test to execute. If <code>None</code>, this class will execute all relevant tests.                   I.e., <code>None</code> acts like a wildcard that means execute all relevant tests in this <code>TestNGSuite</code>.</dd><dd><code>reporter - </code>The reporter to be notified of test events (success, failure, etc).</dd><dd><code>groupsToInclude - </code>Contains the names of groups to run. Only tests in these groups will be executed.</dd><dd><code>groupsToExclude - </code>Tests in groups in this Set will not be executed.</dd><dd><code>stopper - </code>the <code>Stopper</code> may be used to request an early termination of a suite of tests. However, because TestNG does                  not support the notion of aborting a run early, this class ignores this parameter.</dd><dd><code>properties - </code>a <code>Map</code> of properties that can be used by the executing <code>Suite</code> of tests. This class                        does not use this parameter.</dd><dd><code>distributor - </code>an optional <code>Distributor</code>, into which nested <code>Suite</code>s could be put to be executed                by another entity, such as concurrently by a pool of threads. If <code>None</code>, nested <code>Suite</code>s will be executed sequentially.
                Because TestNG handles its own concurrency, this class ignores this parameter.
   <br><br></dd></dl>
    <dl>
        <dt style="margin:10px 0 0 20px;">
          <b>Overrides</b>
        </dt>
        <dd>
        <a href="../../../org/scalatest/Suite.html" target="_self">Suite</a>.<a href="../../../org/scalatest/Suite.html#execute%28Option%5BString%5D%2Corg.scalatest.Reporter%2Corg.scalatest.Stopper%2CSet%5BString%5D%2CSet%5BString%5D%2CMap%5BString%2CAny%5D%2COption%5Borg.scalatest.Distributor%5D%29" target="_self">execute</a>
        </dd>
      </dl><hr></hr></div>


    <hr></hr>
        <div>Copyright (C) 2001-2008 Artima, Inc. All rights reserved.</div><table summary="" class="navigation">
        <tr>
          <td class="navigation-links" valign="top">
            <!-- <table><tr></tr></table> -->
          </td>
          <td align="right" valign="top" style="white-space:nowrap;" rowspan="2">
            <div class="doctitle-larger">ScalaTest 0.9.4</div>
          </td>
        </tr>
        <tr><td></td></tr>
      </table>
      </body>
      </html>